package com.fowo.api.model.stock;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Data;

/** 成品入库单 导入导出辅助模型 */
@Data
public class StockInFinishedProductExcelPo {

  @ExcelProperty(value = "入库单号")
  private String orderSn;

  @NotNull(message = "仓库不能为空")
  @ExcelProperty(value = "*仓库")
  private String warehouseName;

  @ExcelIgnore
  @ExcelProperty(value = "*仓库")
  private Long warehouse;

  @ExcelProperty(value = "入库类型")
  private String receiptType;

  @NotNull(message = "供应商不能为空")
  @ExcelProperty(value = "*供应商")
  private String supplierSupplierName;

  @ExcelIgnore
  @ExcelProperty(value = "*供应商")
  private Long supplier;

  @NotNull(message = "入库日期不能为空")
  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "*入库日期")
  private java.util.Date warehousingDate;

  @ExcelProperty(value = "金额")
  private String totalAmount;

  @ExcelProperty(value = "数量")
  private String totalNum;

  @Size(max = 500, message = "备注长度不能超过20")
  @ExcelProperty(value = "备注")
  private String remarks;

  @ExcelProperty(value = "单据状态")
  private String status;

  @ExcelProperty(value = "部门")
  private String applicationDepName;

  @ExcelIgnore
  @ExcelProperty(value = "部门")
  private Long applicationDep;

  @EnumsString(
    value = { "原材料", "成品" },
    message = "产品类型的可用值为 “原材料”, “成品” 其中之一"
  )
  @ExcelProperty(value = "产品类型")
  private String productType;

  @Size(max = 50, message = "采购员长度不能超过20")
  @ExcelProperty(value = "采购员")
  private String cgRealname;

  @EnumsString(
    value = { "未生成", "已生成" },
    message = "生成应付的可用值为 “未生成”, “已生成” 其中之一"
  )
  @ExcelProperty(value = "生成应付")
  private String generateAp;

  @NotNull(message = "采购组织不能为空")
  @ExcelProperty(value = "*采购组织")
  private String purchasingOrgName;

  @ExcelIgnore
  @ExcelProperty(value = "*采购组织")
  private Long purchasingOrg;

  @NotNull(message = "需求组织不能为空")
  @ExcelProperty(value = "*需求组织")
  private String needOrgName;

  @ExcelIgnore
  @ExcelProperty(value = "*需求组织")
  private Long needOrg;
}
